#ifndef bumpers_h
#define bumpers_h


/**
 * @defgroup nxbot_bumper BUMPER Library 
 * @ingroup nxbot_low_level
 * @code #include <bumpers.h> @endcode
 * @brief Interrupt Bumper library for checking the state of the bumper %sensors in NXBOT. 
 *
 * This module is used to read the state of the four bumpers of NXBot robot. Each pin where a bumper is connected is capable of generating a 
 * hardware interrupt, specifically a PCINT (Pin Change Interrupt). That means, the module updates the state of the bumpers each time 
 * one of them has been pressed. Therefore, it is necessary to enable interrupts, for example via the <i>sei()</i> function.
 */

/**@{*/

/**
 * @brief returns the last updated state of the bumpers.
 *
 * As the bumpers are binary
 * @return A byte where the the first four bits represent the bumpers state:
 *					- @b Bit0:
 *              <br> Front Left Bumper
 *					- @b Bit1:		
 *              <br> Front Right Bumper
 *					- @b Bit2:		
 *              <br> Back Left Bumper
 *					- @b Bit3:		
 *              <br> Back Right Bumper
 */
unsigned char bumpers_read(void);


/**
 * @brief Hardware initialization for the %bumpers module.
 *
 * Configures each pin as inputs, and configures the PCINT interrupts. The pins are defined in the %bumpers.c file.
 */
void bumpers_init(void);

/**@}*/
#endif
